<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>03_JS数据类型</title>
</head>
<body>
<script>
    var a=1;
    var b=3.14;
    console.log(a,typeof a,b,typeof b)
    var c='www';
    var d="www";
    console.log(c,typeof c,d,typeof d)
    var e=true;
    var f=false;
    console.log(e,typeof e,f,typeof f)
    var de;
    console.log(de,typeof de)

    let obj={}
    console.log(obj,typeof obj)

    let obj2={
        name:'张三',
        age:12
    };
    console.log(obj2,typeof obj2)
    console.log(obj2.name,obj2.age)
    obj2.like="放假"
    console.log(obj2)
    console.log(obj2.play)

    let arr=[1,2,true,'hhh']
    console.log(arr,typeof arr)
    console.log(arr[0],arr[1],arr[2],arr[3])
    console.log(arr[99])

    console.log(Boolean(0))
    console.log(Boolean(null))
    console.log(Boolean(""))
    console.log(Boolean(NaN))
    console.log(Boolean(undefined))
    console.log("---------------")
    console.log(Boolean(1))
    console.log(Boolean(" "))
    console.log(Boolean("jjj"))

    console.log(Number(true),typeof Number(true))
    console.log(Number(false),typeof Number(false))
    console.log(Number("kkk"),typeof Number("kkk"))
</script>
</body>
</html>